/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.muni.fi.pb138.mathml_canonicalizator;

import java.util.Map;

/**
 *
 * @author Richard
 */
public class EraserTransformer implements Transformer {

    private Node root;
    
    public EraserTransformer(String tagName, Map<String, String> attributes) {
        root = new NodeImpl(tagName, attributes);
    }
    
    @Override
    public void addChild(Node n) {
        root.addChild(n);
    }

    @Override
    public void setTextContent(String s) {
        root.setTextContent(s);
    }

    @Override
    public Node transform() {
        // root is set as shadow, but has children -> only children will be printed out
        root.setShadow(true);
        return root;
    }
    
}
